package com.ruoyi.web.controller.durian.ALiYunAISDK;

import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.durian.service.LlDriverService;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/customer")
public class CustomerController {

    @Resource
    private LlDriverService llDriverService;

    /**
     * 客服聊天
     * @param message
     * @return
     * @throws NoApiKeyException
     * @throws InputRequiredException
     */
    @PostMapping("/callWithOthers")
    public AjaxResult callWithOthers(String message) throws NoApiKeyException, InputRequiredException {
        return llDriverService.callWithOthers(message);

    }

}
